﻿@inherits Umbraco.Web.Mvc.UmbracoTemplatePage

@{
    @* Get the media folder as a dynamic node *@
    var mediaFolder = Umbraco.Media("1102");

    var cacoucelTexts = umbraco.library.GetDictionaryItems("Caroucel").Current.Select("/DictionaryItems/DictionaryItem");
    cacoucelTexts.MoveNext();
    if (mediaFolder.Children.Any())
    {
        <ul class="bxslider">
            @foreach (var mediaItem in mediaFolder.Children)
            {
                
                <li style="background-image:url(@mediaItem.umbracoFile);"><img src="/images/phone.png" style="display:none" title="@cacoucelTexts.Current.Value" alt="@cacoucelTexts"></img></li>
                cacoucelTexts.MoveNext();
            }
        </ul>
    }
}

<script type="text/javascript">
    $('.bxslider').bxSlider({
        auto: true,
        captions: true,
        autoControls: true
    });
</script>